<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Scrum项目管理</title>
{link type='css' name='base.css'}
{link type='css' name='common.css'}
{link type='css' name='flybird.css'}
{link type='css' name='scrum.css'}
{link type='css' name='jquery-ui.css'}

<style>
.task{
	cursor:default;
}
</style>
</head>
<body>
	<div class="success" id="message-box">操作完成</div>
	<div class="col_main">
		<div class="main_hd">
			<div class="sprint-name J_sprintName">
				<span class="J_sprintdblClick" title="双击进行编辑">
					<p>{$sprintInfo['name']}</p>
				</span>
				<div class="sprint-name-actions d-hidden J_delSprint">
					<a rel="nofollow" id="{$sid}" class="delete-link J_delSprintAction" href="javascript:void(0);">删  除</a>
				</div>
			</div>
			<div class="edit_sprint J_editSprintAction d-hidden">
				<input type="text" value="{$sprintInfo['name']}" spellcheck="true" placeholder="冲刺名称" maxlength="50" id="sprint_name_edit" class="text sprint-name-editable" autocomplete="off">
				<div class="container-buttons">
					<input type="submit" value="保  存" data-value="{$sprintInfo['id']}" id="sprint_name_save" class="button-medium btn-green">
					<input type="button" value="取  消" id="sprint_name_cancel" class="button-medium btn-gray btn-marg-left">
				</div>
			</div>
		    <div class="sprint-actions">
				{if !empty($sprintInfo)}
				<span class="sprint-list J_sprint_list">冲刺列表
					<div class="sprint-list-view d-hidden J_sprint_view">
						{foreach from=$sprintsList item=sprint}
						<a href="/web/scrum/index?sid={$sprint['id']}" {if ($sid == $sprint['id'])}class="checked"{/if}>{$sprint['name']}</a>
                        {/foreach}
					</div>
				</span>
				<div class="sprint-new J_addSprint">新冲刺</div>
				<div class="sprint-new-form {if !empty($sid)}d-hidden{/if} J_addSprintDiv">
					<label>名称：</label>
					<input type="text" id="sprint_name" class="text" placeholder="冲刺名称" />
					<div class="actions-inputs">
						<input type="button" value="保  存" class="button-medium btn-green J_sprint_new_save" />
						<input type="button" value="取  消" class="button-medium btn-gray btn-marg-left J_sprint_new_cancel" />
					</div>
				</div>
				{/if}
			</div>
		</div>
		<div class="main_bd">
			<div class="my_service_panel">
			    <div class="table_msg">
			        <table cellspacing="0" cellpadding="0">
			            <thead class="thead">
			                <tr>
			                    <th class="table_cell" style="width:200px;">
			                    </th>
			                    <th class="table_cell" style="width:220px;text-align:center;font-weight:bold;">
			                        Todo
			                    </th>
			                    <th class="table_cell" style="width:220px;text-align:center;font-weight:bold;">
			                        Doing
			                    </th>
			                    <th class="table_cell" style="width:220px;text-align:center;font-weight:bold;">
			                        Testing
			                    </th>
								<th class="table_cell" style="width:220px;text-align:center;font-weight:bold;">
									Done
			                    </th>
			                </tr>
			            </thead>
						{if !empty($sid)}
			            <tbody class="tbody" id="list">
							<tr>
			                    <td class="story-bg" style="vertical-align:top;">
									<!--span title="Double-click to edit" class="story-name"><p>test</p></span>
			    					<div class="story-new-actions">
										<span id="" class="new-task-link">添加任务</span>
			    					</div-->

			    					<div id="J_taskNew" class="task task-new task-yellow">
			    						<div>
											<textarea class="resizable" id="task_name" name="task[name]" placeholder="任务名称"></textarea>
										</div>
										<div class="task-actions" style="display: block;">
											<div id="J_taskBgColor" class="task-new-colors">
												<span title="blue" class="task-blue"></span>
												<span title="yellow" class="task-yellow"></span>
												<span title="pink" class="task-pink"></span>
												<span title="green" class="task-green"></span>
												<span title="orange" class="task-orange"></span>
											</div>
											<input id="task_sid" type="hidden" value="{$sid}" />
											<input id="task_color" type="hidden" value="task-yellow" >
										</div>
										<div class="actions-inputs">
											<input type="submit" value="保  存" id="save_task" class="button-small btn-green">
											<input type="button" value="重  置" id="cancle_task" class="button-small btn-gray btn-marg-left">
										</div>
			    					</div>
			    				</td>
			                    <td style="vertical-align:top;" id="J_sortTodo" class="connectedSortable"  data-type="todo">
                                    {foreach from=$todoList item=todo}
									<div id="{$todo['id']}"  class="task task-with-actions {$todo['bgcolor']} J_subTask">
										<span title="Double-click to edit" class="task-name J_dblEditTask"><p>{$todo['task_name']|nl2br}</p></span>
										<div class="d-hidden J_editTaskDiv">
											<textarea class="task_edit_resizable J_subTaskName" name="task">{$todo['task_name']}</textarea>
											<div class="actions-inputs">
												<input type="button" value="更  新" data-value="{$todo['id']}" class="button-small btn-orange J_editDoTask">
												<input type="button" value="取  消" class="button-small btn-gray btn-marg-left J_cancelTaskEdit">
											</div>
										</div>
										<div class="task-actions-icon">
											<img class="J_taskSetting"  width="14" height="14" title="设置" src="{$staticPath}/images/icon-gear.png" alt="设置" />
										</div>
										<div class="task-actions d-hidden J_subTaskAction">
											<div class="task-colors J_subTaskBgcolor">
												<span title="blue" class="task-blue"></span>
												<span title="yellow" class="task-yellow"></span>
												<span title="pink" class="task-pink"></span>
												<span title="green" class="task-green"></span>
												<span title="orange" class="task-orange"></span>
											</div>
											<span class="task-delete">
												<span data-id="{$todo['id']}" class="delete-link J_deleteTask">删  除</span>
											</span>
										</div>
									</div>
                                    {/foreach}
			    				</td>
			                    <td style="vertical-align:top;" id="J_sortProgress" class="connectedSortable">
                                    {foreach from=$progressList item=progress}
									<div id="{$progress['id']}" class="task task-with-actions {$progress['bgcolor']} J_subTask">
										<span title="Double-click to edit" class="task-name J_dblEditTask"><p>{$progress['task_name']|nl2br}</p></span>
										<div class="d-hidden J_editTaskDiv">
											<textarea class="task_edit_resizable J_subTaskName" name="task">{$progress['task_name']}</textarea>
											<div class="actions-inputs">
												<input type="button" value="更  新" data-value="{$progress['id']}" class="button-small btn-orange J_editDoTask">
												<input type="button" value="取  消" class="button-small btn-gray btn-marg-left J_cancelTaskEdit">
											</div>
										</div>
										<div class="task-actions-icon">
											<img class="J_taskSetting" width="14" height="14" title="设置" src="{$staticPath}/images/icon-gear.png" alt="设置">
										</div>
										<div class="task-actions d-hidden J_subTaskAction">
											<div class="task-colors J_subTaskBgcolor">
												<span title="blue" class="task-blue"></span>
												<span title="yellow" class="task-yellow"></span>
												<span title="pink" class="task-pink"></span>
												<span title="green" class="task-green"></span>
												<span title="orange" class="task-orange"></span>
											</div>
											<span class="task-delete">
												<span data-id="{$progress['id']}" class="delete-link J_deleteTask">删  除</span>
											</span>
										</div>
									</div>
                                    {/foreach}
			    				</td>
			                    <td style="vertical-align:top;" id="J_sortVerify" class="connectedSortable">
                                    {foreach from=$verifyList item=verify}
									<div id="{$verify['id']}" class="task task-with-actions {$verify['bgcolor']} J_subTask">
										<span title="Double-click to edit" class="task-name J_dblEditTask"><p>{$verify['task_name']|nl2br}</p></span>
										<div class="d-hidden J_editTaskDiv">
											<textarea class="task_edit_resizable J_subTaskName" name="task">{$verify['task_name']}</textarea>
											<div class="actions-inputs">
												<input type="button" value="更  新" data-value="{$verify['id']}" class="button-small btn-orange J_editDoTask">
												<input type="button" value="取  消" class="button-small btn-gray btn-marg-left J_cancelTaskEdit">
											</div>
										</div>
										<div class="task-actions-icon">
											<img class="J_taskSetting" width="14" height="14" title="设置" src="{$staticPath}/images/icon-gear.png" alt="设置" />
										</div>
										<div class="task-actions d-hidden J_subTaskAction">
											<div class="task-colors J_subTaskBgcolor">
												<span title="blue" class="task-blue"></span>
												<span title="yellow" class="task-yellow"></span>
												<span title="pink" class="task-pink"></span>
												<span title="green" class="task-green"></span>
												<span title="orange" class="task-orange"></span>
											</div>
											<span class="task-delete">
												<span data-id="{$verify['id']}" class="delete-link J_deleteTask">删  除</span>
											</span>
										</div>
									</div>
                                    {/foreach}
			                  	</td>
      							<td style="vertical-align:top;" id="J_sortDone" class="connectedSortable">
                                    {foreach from=$doneList item=done}
									<div id="{$done['id']}" class="task task-with-actions {$done['bgcolor']} J_subTask">
										<span title="Double-click to edit" class="task-name J_dblEditTask"><p>{$done['task_name']|nl2br}</p></span>
										<div class="d-hidden J_editTaskDiv">
											<textarea class="task_edit_resizable J_subTaskName" name="task">{$done['task_name']}</textarea>
											<div class="actions-inputs">
												<input type="button" value="更  新" data-value="{$done['id']}" class="button-small btn-orange J_editDoTask">
												<input type="button" value="取  消" class="button-small btn-gray btn-marg-left J_cancelTaskEdit">
											</div>
										</div>
										<div class="task-actions-icon">
											<img class="J_taskSetting" width="14" height="14" title="设置" src="{$staticPath}/images/icon-gear.png" alt="设置" />
										</div>
										<div class="task-actions d-hidden J_subTaskAction">
											<div class="task-colors J_subTaskBgcolor">
												<span title="blue" class="task-blue"></span>
												<span title="yellow" class="task-yellow"></span>
												<span title="pink" class="task-pink"></span>
												<span title="green" class="task-green"></span>
												<span title="orange" class="task-orange"></span>
											</div>
											<span class="task-delete">
												<span data-id="{$done['id']}" class="delete-link J_deleteTask">删  除</span>
											</span>
										</div>
									</div>
                                    {/foreach}
			                  	</td>
			                </tr>
			              </tbody>
                        {/if}
			        </table>
			    </div>
			</div>
		</div>
	</div>
</body>
</html>
{link type='js' name='jquery-1.8.3.min.js'}
{link type='js' name='jquery.textarearesizer.js'}
{link type='js' name='scrum-debug.js'}

<script type="text/javascript">
	Scrum.init();
	Scrum.sprintList();
</script>